package com.yyx.springcould.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: ConfigClientController
 * Package: com.yyx.springcould.controller
 * Description:
 *
 * @Author: yyx
 * @Create: 2025/7/28 - 11:48
 */
@RefreshScope
@RestController
public class ConfigClientController {

    @Value("${config.info}")
    private String configInfo;

    @Value("${config.version}")
    private String configVersion;

    @GetMapping("/configInfo")
    public String getConfigInfo(){
        return "info"+configInfo+"version"+configVersion;
    }
}